<%--
  Created by IntelliJ IDEA.
  User: Moataz
  Date: Mar 19, 2009
  Time: 8:04:42 PM
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
<head><title>4H Events Details</title></head>
<body>
<%@ include file="header.jspf" %>
<h3>Events Details</h3>

<%@ include file="eventDetailTable.jspf" %>

<c:if test="${empty unfilledPositions}">
    <br>

    <h3><strong>All positions are currently filled.</strong></h3>
</c:if>
<c:if test="${not empty unfilledPositions}">
    <br>

    <h3><strong>Unfilled Positions:</strong></h3>
    <table border="1" width="100%">
        <tr>
            <%@ include file="positionsListTableHeader.jspf" %>
            <td BGCOLOR="limegreen"><strong>Sign up</strong></td>
        </tr>
        <c:forEach var="position" items="${unfilledPositions}">
            <tr>
                <%@ include file="positionsListTable.jspf" %>
                <td valign="top" align="center">
                    <form action="signup" method="post">
                        <input type="hidden" name="eventId" value="${event.id}"/>
                        <input type="hidden" name="positionId" value="${position.id}"/>
                        <input type="submit" value="Sign up"/>
                    </form>
                </td>
            </tr>
        </c:forEach>
    </table>
</c:if>
<br>
<br>
<%@ include file="footer.jspf" %>
</body>
</html>